﻿using System;
using System.Collections.Generic;
using Informant.Contacts;
using System.Runtime.Serialization;

namespace Informant.Google.Contacts
{
	[DataContract]
	public class Contact : IContact
	{
		/// <summary>
		/// Gets or sets the id.
		/// </summary>
		/// <value>The id.</value>
		[DataMember]
		public String Id { get; set; }
		/// <summary>
		/// Gets or sets the first name.
		/// </summary>
		/// <value>The first name.</value>
		[DataMember]
		public String FirstName { get; set; }
		/// <summary>
		/// Gets or sets the last name.
		/// </summary>
		/// <value>The last name.</value>
		[DataMember]
		public String LastName { get; set; }
		/// <summary>
		/// Gets the full name.
		/// </summary>
		/// <value>The full name.</value>
		public String Name
		{
			get
			{
				return String.Format("{0} {1}", FirstName, LastName);
			}
		}
		/// <summary>
		/// Gets or sets the organizations.
		/// </summary>
		/// <value>The organizations.</value>
		[DataMember]
		public IEnumerable<IOrganization> Organizations { get; set; }
		/// <summary>
		/// Gets or sets the addresses.
		/// </summary>
		/// <value>The addresses.</value>
		[DataMember]
		public IEnumerable<IAddress> Addresses { get; set; }
		/// <summary>
		/// Gets or sets the emails.
		/// </summary>
		/// <value>The emails.</value>
		[DataMember]
		public IEnumerable<IEmail> Emails { get; set; }
		/// <summary>
		/// Gets or sets the phones.
		/// </summary>
		/// <value>The phones.</value>
		[DataMember]
		public IEnumerable<IPhone> Phones { get; set; }
		/// <summary>
		/// Gets or sets the groups.
		/// </summary>
		/// <value>The groups.</value>
		[DataMember]
		public IEnumerable<IGroup> Groups { get; set; }
	}
}
